<html>
<head><meta charset="utf-8"><title>Debug info in stage 0 compiler? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20in.20stage.200.20compiler.3F.html">Debug info in stage 0 compiler?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="182026592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20in%20stage%200%20compiler%3F/near/182026592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20in.20stage.200.20compiler.3F.html#182026592">(Nov 27 2019 at 14:59)</a>:</h4>
<p>Is there a way to build stage 0 with debug info so that in backtraces I'll see line numbers? I have <code>debug = true</code> and <code>debug_level = 2</code> in my config.toml but I still don't have any line numbers in my backtraces.</p>



<a name="182027642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20in%20stage%200%20compiler%3F/near/182027642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20in.20stage.200.20compiler.3F.html#182027642">(Nov 27 2019 at 15:11)</a>:</h4>
<p>The stage 0 compiler is the <code>beta</code> channel compiler that it downloaded to bootstrap so changing <code>debug = true</code> won't give you line numbers for backtraces because when it was built on the CI server, it wasn't built with debug symbols. If you continue the bootstrap to stage 1, then the compiler will be built with your debug settings. </p>
<p>See <a href="https://rust-lang.github.io/rustc-guide/building/how-to-build-and-run.html#bootstrapping" target="_blank" title="https://rust-lang.github.io/rustc-guide/building/how-to-build-and-run.html#bootstrapping">https://rust-lang.github.io/rustc-guide/building/how-to-build-and-run.html#bootstrapping</a> for more info</p>



<a name="182027843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20in%20stage%200%20compiler%3F/near/182027843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20in.20stage.200.20compiler.3F.html#182027843">(Nov 27 2019 at 15:14)</a>:</h4>
<p>Ahh, OK, in that case it's not useful for me at all. I thought stage 0 is compiler built from source using the downloaded rustc.</p>



<a name="182028150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20in%20stage%200%20compiler%3F/near/182028150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20in.20stage.200.20compiler.3F.html#182028150">(Nov 27 2019 at 15:16)</a>:</h4>
<p>Nah, that's the stage1 compiler. stage0 just builds std</p>



<a name="182028186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20in%20stage%200%20compiler%3F/near/182028186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20in.20stage.200.20compiler.3F.html#182028186">(Nov 27 2019 at 15:17)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span> thanks.</p>



<a name="182028212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20in%20stage%200%20compiler%3F/near/182028212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20in.20stage.200.20compiler.3F.html#182028212">(Nov 27 2019 at 15:17)</a>:</h4>
<p>Not sure what you're trying to do but you can build a compiler locally with debug symbols and tell rustbuild to use that instead of the <code>beta</code> compiler</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>